gtk4.git
12 years agogdk: Unvfuncify generic key functions
Benjamin Otte [Tue, 16 Apr 2013 13:27:15 +0000 (15:27 +0200)]
gdk: Unvfuncify generic key functions

This makes Wayland and X11 no longer call into XKB and libX11 for these
functions but use GDK's own copy of these functions, just like the
win32, quartz and broadway backends.

12 years agogdk: Refactor default key vfuncs
Benjamin Otte [Tue, 16 Apr 2013 13:24:02 +0000 (15:24 +0200)]
gdk: Refactor default key vfuncs

Instead of copying them all over the place, keep a default
implementation around.

12 years agogdk: Refactor gdk_keyval_convert_case()
Benjamin Otte [Tue, 16 Apr 2013 11:02:23 +0000 (13:02 +0200)]
gdk: Refactor gdk_keyval_convert_case()

... so it doesn't export the function anymore.

12 years agobroadway: Delete 2 files doing nothing
Benjamin Otte [Mon, 15 Apr 2013 13:54:50 +0000 (15:54 +0200)]
broadway: Delete 2 files doing nothing

A function was doing nothing but calling a function that was in its own
source file doing nothing but calling a function in its own source file
that did nothing.

12 years agodocs: Move property section docs to correct file
Benjamin Otte [Mon, 15 Apr 2013 13:52:10 +0000 (15:52 +0200)]
docs: Move property section docs to correct file

12 years agoGtkSwitch: moved focus drawing from outside border inside the handle.
Juan Pablo Ugarte [Mon, 15 Apr 2013 20:24:48 +0000 (17:24 -0300)]
GtkSwitch: moved focus drawing from outside border inside the handle.

12 years agoMerge branch 'merge-places-sidebar'
Federico Mena Quintero [Tue, 16 Apr 2013 00:29:37 +0000 (19:29 -0500)]
Merge branch 'merge-places-sidebar'

This is the new GtkPlacesSidebar widget, which is the sidebar used in
GtkFileChooser to display a list of places/folders that the user may
want to use.  File managers are encouraged to use this widget for
their own global list of folders.

12 years agoLoad the file chooser's widgets from the .ui file
Tristan Van Berkom [Fri, 12 Apr 2013 01:37:01 +0000 (20:37 -0500)]
Load the file chooser's widgets from the .ui file

This is Tristan's *excellent* work, minus the old code for the shortcuts bar - that is all done
in GtkPlacesSidebar now.

The UI gets loaded from a Glade resource; most of the old code to create the UI by hand is gone.

There is still code for save_widgets_create(); this needs to be moved into the UI file, but it
is not a big deal.

gtk_file_chooser_default_init() calls a new post_process_ui() that takes care of all the things
that cannot be done directly in Glade.

12 years agoFor now, add GtkPlacesSidebar to the Glade catalog for private widgets
Federico Mena Quintero [Sat, 13 Apr 2013 00:57:35 +0000 (19:57 -0500)]
For now, add GtkPlacesSidebar to the Glade catalog for private widgets

Although GtkPlacesSidebar is a public widget, we can't have that in Glade's general catalog
as this branch is not merged into GTK+ proper yet.  We'll move the widget to Glade's
catalog when this is done.

12 years agoAdd .ui file for GtkFileChooserDefault
Federico Mena Quintero [Sat, 13 Apr 2013 00:58:16 +0000 (19:58 -0500)]
Add .ui file for GtkFileChooserDefault

12 years agoUpdated Interlingua translation
Nik Kalach [Mon, 15 Apr 2013 19:42:57 +0000 (21:42 +0200)]
Updated Interlingua translation

12 years agogdk: Make atoms handled generically
Benjamin Otte [Mon, 15 Apr 2013 13:40:55 +0000 (15:40 +0200)]
gdk: Make atoms handled generically

This is another step towards making GdkDisplayManager backend-agnostic.

Most of the backends profit from this as their atom implementations
where generic anyway - x11 needed that to allow multiple X displays and
broadway, quartz and wayland don't have the concept of displays.

The X11 backend still did things, so I only #if 0'd some code but did
not actually update anything.

12 years agogdk: Remove unused function
Benjamin Otte [Wed, 10 Apr 2013 21:27:52 +0000 (23:27 +0200)]
gdk: Remove unused function

12 years agodisplaymanager: Handle list of displays in base class
Benjamin Otte [Wed, 10 Apr 2013 21:11:52 +0000 (23:11 +0200)]
displaymanager: Handle list of displays in base class

This moves the add/remove_display() functions from the subclasses to
GdkDisplay and GdkDisplayManager. It also gets rid of the list_displays
vfunc.

12 years agodoc: Clarify gtk_widget_queue_draw_region() doc
Simon Kågedal Reimer [Tue, 9 Apr 2013 21:10:38 +0000 (23:10 +0200)]
doc: Clarify gtk_widget_queue_draw_region() doc

12 years agodisplaymanager: Move set_default_display vfunc
Benjamin Otte [Tue, 9 Apr 2013 11:32:03 +0000 (13:32 +0200)]
displaymanager: Move set_default_display vfunc

... to GdkDisplayClass.make_default. It's only implemented by X11
anyway.

12 years agodisplaymanager: Handle the default display
Benjamin Otte [Tue, 9 Apr 2013 11:25:31 +0000 (13:25 +0200)]
displaymanager: Handle the default display

... instead of having every backend do it on their own.

12 years agoprint: disconnect source_changed_handler on printeroptionwidget finalize
Alban Browaeys [Thu, 21 Mar 2013 08:45:32 +0000 (09:45 +0100)]
print: disconnect source_changed_handler on printeroptionwidget finalize

Printing a web page without window.print (which still segfault),
that is Ctrl+P is fixed (does not attempt to execute the
source_changed_handler on a printeroptionwidget that has been
destroyed) by disconnecting this handler in the printeroptionwidget
finalize.

https://bugzilla.gnome.org/show_bug.cgi?id=696622

12 years agogtk-demo: Fix typo
Volker Sobek [Tue, 8 May 2012 01:32:28 +0000 (03:32 +0200)]
gtk-demo: Fix typo

https://bugzilla.gnome.org/show_bug.cgi?id=675649

12 years agogtkprintjob: release the surface and backend before the output io channel
Carlos Garcia Campos [Wed, 3 Oct 2012 17:24:52 +0000 (19:24 +0200)]
gtkprintjob: release the surface and backend before the output io channel

If the GtkPrintJob is freed too early when the surface has been created
but the job hasn't been sent to the printer, it's possible that the
file print backend tries to write to the io chaneel when it is already
closed. This produces runtime critical warnings:

GLib-CRITICAL **: g_io_channel_write_chars: assertion `channel->is_writeable' failed

https://bugzilla.gnome.org/show_bug.cgi?id=685420

12 years agogtkprintbackendfile: Fix infinite loop in _cairo_write()
Carlos Garcia Campos [Wed, 3 Oct 2012 17:34:09 +0000 (19:34 +0200)]
gtkprintbackendfile: Fix infinite loop in _cairo_write()

It can happen if the io channel has been closed. In that case
g_io_channel_write_chars() returns early because of a g_return macro
that checks if the io channel is writable. When returning from g_return
macros, the bytes written output parameter is not updated and the error
is not filled, so the error is not detected and the written variable is
used uninitialized. We should check the return value of
g_io_channel_write_chars() to break the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=685419

12 years agofix mem leak in gtk_drag_set_icon_surface, destroy pattern
ammonkey [Wed, 8 Aug 2012 17:07:17 +0000 (19:07 +0200)]
fix mem leak in gtk_drag_set_icon_surface, destroy pattern

https://bugzilla.gnome.org/show_bug.cgi?id=681446

12 years agoPrecache more atoms
Matthias Clasen [Sat, 13 Apr 2013 23:48:38 +0000 (19:48 -0400)]
Precache more atoms

Add a few more entries to the list of precached atoms.

12 years agowayland: Don't get the shell surface twice
Matthias Clasen [Sat, 13 Apr 2013 21:20:05 +0000 (17:20 -0400)]
wayland: Don't get the shell surface twice

Noticed by Pu Xingyu,
https://bugzilla.gnome.org/show_bug.cgi?id=697947

12 years agoRevert "Use natural size to set adjustment ranges"
Matthias Clasen [Sat, 13 Apr 2013 20:17:24 +0000 (16:17 -0400)]
Revert "Use natural size to set adjustment ranges"

This reverts commit 666d10ec7676a15b6861b785397563cbd4ef21e6.

This change severely broke any treeviews without horizontal
scrollbars. Basically, ellipsization never kicks in, and instead
the treeview content just extends outside the visible area,
rendering it inaccessible. This broke e.g. the control-center
keyboard shortcuts panel, the gnome-disks device list, etc etc.

12 years agocsd: Don't use a content_window for o-r windows
Matthias Clasen [Sat, 13 Apr 2013 02:45:13 +0000 (22:45 -0400)]
csd: Don't use a content_window for o-r windows

This fixes drawing of dnd icons.
https://bugzilla.gnome.org/show_bug.cgi?id=697886

12 years agowayland: Don't "probe" for a Wayland compositor if started from compositor
Rob Bradford [Fri, 12 Apr 2013 17:39:20 +0000 (18:39 +0100)]
wayland: Don't "probe" for a Wayland compositor if started from compositor

In the case that the client is started directly by the compositor the
WAYLAND_SOCKET environment variable is set containing the fd to use that was
created by a socketpair.

This environment variable is consumed by a call to wl_display_connect so a
second call will not take advantage of it.

https://bugzilla.gnome.org/show_bug.cgi?id=697673

12 years agoMove all of GtkFileChooserDefault's fields into a private structure
Federico Mena Quintero [Fri, 12 Apr 2013 03:44:19 +0000 (22:44 -0500)]
Move all of GtkFileChooserDefault's fields into a private structure

I love Emacs macros, by the way.

12 years agoMove GtkFileChooserDefault to gtkfilechooserdefault.c
Federico Mena Quintero [Fri, 12 Apr 2013 02:44:21 +0000 (21:44 -0500)]
Move GtkFileChooserDefault to gtkfilechooserdefault.c

We will move all the fields to a private structure next.

12 years agoMove GtkFileChooserWidgetPrivate to gtkfilechooserwidget.c
Federico Mena Quintero [Fri, 12 Apr 2013 01:50:57 +0000 (20:50 -0500)]
Move GtkFileChooserWidgetPrivate to gtkfilechooserwidget.c

In addition, remove the unused "file_system" field from that
structure.

12 years agoMove GtkFileChooserDialogPrivate into gtkfilechooserdialog.c
Federico Mena Quintero [Fri, 12 Apr 2013 01:46:30 +0000 (20:46 -0500)]
Move GtkFileChooserDialogPrivate into gtkfilechooserdialog.c

We'll take private structures out of gtkfilechooserprivate.h and move
them to the appropriate place.

12 years agoRemove unused #define
Federico Mena Quintero [Fri, 12 Apr 2013 01:42:43 +0000 (20:42 -0500)]
Remove unused #define

12 years agoDon't include gtkfilechooserprivate.h from the file chooser's tests
Federico Mena Quintero [Fri, 12 Apr 2013 01:40:05 +0000 (20:40 -0500)]
Don't include gtkfilechooserprivate.h from the file chooser's tests

We will make that file a fully private header; the tests have no
business poking inside the file chooser's internals at this point.

12 years agoGtkPlacesSidebar: Hold a reference to the sidebar while a D-Bus proxy is being created
Federico Mena Quintero [Fri, 12 Apr 2013 01:04:53 +0000 (20:04 -0500)]
GtkPlacesSidebar: Hold a reference to the sidebar while a D-Bus proxy is being created

The creation is async, and the sidebar could be destroyed while the D-Bus proxy is being created.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
12 years agoMerge branch 'places-sidebar' into master
Federico Mena Quintero [Fri, 12 Apr 2013 00:45:12 +0000 (19:45 -0500)]
Merge branch 'places-sidebar' into master

This lands the GtkPlacesSidebar widget.  It is used in
GtkFileChooserDefault, and it can also be used by third-party
applications.

12 years agoRevert "GtkFileChooserDefault: Define children with a GtkBuilder template"
Federico Mena Quintero [Thu, 11 Apr 2013 21:47:38 +0000 (16:47 -0500)]
Revert "GtkFileChooserDefault: Define children with a GtkBuilder template"

Having the changes for composite widget templates makes it impossible
to merge the places-sidebar branch.  So, we will merge that branch,
and *then* apply the changes for composite templates.

This reverts commit bf909f56157311174d5d9089bdec954e7def8873.

12 years agoxi2: Improve pointer emulation debug reporting
David King [Thu, 11 Apr 2013 13:29:11 +0000 (14:29 +0100)]
xi2: Improve pointer emulation debug reporting

Reporting "true" or "false" is nicer than the value of the flag.

https://bugzilla.gnome.org/show_bug.cgi?id=697795

12 years agogdkwindow: Handle updates created by outstanding moves in same update
Alexander Larsson [Thu, 11 Apr 2013 10:15:30 +0000 (12:15 +0200)]
gdkwindow: Handle updates created by outstanding moves in same update

If gdk_window_flush_outstanding_moves() creates new update area
we handle this directly in the same draw to avoid flashing.

This mainly affects win32 as X11 does its exposes from moves async.
However, its important for win32 since ScrollDC seems to sometimes
invalidate (and not copy) unexected regions.

http://bugzilla.gnome.org/show_bug.cgi?674051

12 years agowin32: Report ScrollDC update region directly
Alexander Larsson [Thu, 11 Apr 2013 10:12:35 +0000 (12:12 +0200)]
win32: Report ScrollDC update region directly

Rather than set the window update region and repaint this region
when we get a WM_PAINT we just directly add it to the update
region. No need to roundtrip via win32.

This lets us also make sure we do this drawing in the same update
cycle. This seems especially important on Win7, because ScrollDC
seems to act kind of weird there, not using bitblt in areas where
it seemingly could, which makes scrolling look really flashy.

http://bugzilla.gnome.org/show_bug-cgi?id=674051

12 years agoMake gdk_flush_outstanding_moves "reentrant"
Alexander Larsson [Thu, 11 Apr 2013 09:35:17 +0000 (11:35 +0200)]
Make gdk_flush_outstanding_moves "reentrant"

If do_move_region_bits_on_impl causes updates they will propely
be moved by the outstanding moves we have not yet flushed.

12 years agoUpdate gtk.symbols
Alexander Larsson [Thu, 11 Apr 2013 09:23:15 +0000 (11:23 +0200)]
Update gtk.symbols

This fixes win32 build

12 years agowin32: Fix build
Alexander Larsson [Thu, 11 Apr 2013 09:22:27 +0000 (11:22 +0200)]
win32: Fix build

Need to take ".exe" into account for file dependencies on win32.

12 years agowin32: Make build with latest gdkdisplay changes
Alexander Larsson [Thu, 11 Apr 2013 09:22:04 +0000 (11:22 +0200)]
win32: Make build with latest gdkdisplay changes

12 years agoxi2: Reset scroll valuators on synthesized crossing events
Carlos Garnacho [Thu, 28 Mar 2013 13:57:00 +0000 (14:57 +0100)]
xi2: Reset scroll valuators on synthesized crossing events

On crossing events resulting from moving windows (eg. workspace switch),
deviceid equals sourceid, so make those reset scroll valuators on all
slave devices to avoid misleading jumps in scroll events

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=690275

12 years agocsd: Use symbolic icons for window buttons
Matthias Clasen [Wed, 10 Apr 2013 10:13:26 +0000 (06:13 -0400)]
csd: Use symbolic icons for window buttons

With symbolic icons, we can recolor the icons as needed, and we
can use icon shadows, etc.

12 years agoDon't free a list that has not been initialized
Matthias Clasen [Wed, 10 Apr 2013 01:18:05 +0000 (21:18 -0400)]
Don't free a list that has not been initialized

12 years agowayland: Use more explicit out parameter names
Chris Cummins [Thu, 28 Mar 2013 14:47:03 +0000 (14:47 +0000)]
wayland: Use more explicit out parameter names

Prevent confusion between positional values and hotspot values.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
12 years agoUpdate GtkCssProvider box-shadow documentation
Chris Cummins [Tue, 9 Apr 2013 10:56:17 +0000 (11:56 +0100)]
Update GtkCssProvider box-shadow documentation

Non-inset box-shadows are no longer ignored by the GTK+ theming engine,
outset shadows are supported.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
12 years agocds: enable outset shadows
Chris Cummins [Fri, 5 Apr 2013 09:54:03 +0000 (10:54 +0100)]
cds: enable outset shadows

Adds conditional code paths to GdkCssShadowValue for painting outset
shadows, and allows shadows to be applied in two passes (first outset
then inset). This can be used to draw csd shadows in outer window
borders.

https://bugzilla.gnome.org/show_bug.cgi?id=695998
Signed-off-by: Rob Bradford <rob@linux.intel.com>
12 years agowayland: don't leave root window values uninitialised
Rob Bradford [Tue, 9 Apr 2013 10:49:42 +0000 (11:49 +0100)]
wayland: don't leave root window values uninitialised

Under Wayland we don't know the absolute position of the device but there are
some API calls that expect to get an root window position. Previously we were
not assigning any value to these out parameters potentially leaving the values
undefined.

This change returns the current surface relative position of the device.

12 years agoquartz: Fix call to missing symbol
Carlos Garnacho [Mon, 8 Apr 2013 15:25:19 +0000 (17:25 +0200)]
quartz: Fix call to missing symbol

This patch can be considered a leftover of commit 6f607fc8b4cd ,
replace the no longer existing function with the GDK function
meant to replace it.

This was noticeable on regular clipboard operations in quartz

12 years agowindow: Remember current size
Benjamin Otte [Tue, 9 Apr 2013 10:08:08 +0000 (12:08 +0200)]
window: Remember current size

Don't just look at previously remembered sizes, also look at the current
size.
This is useful for cases where the window was resized by the user or WM
and not by the application itself.

https://bugzilla.gnome.org/show_bug.cgi?id=696882

12 years agowindow: Split out a function
Benjamin Otte [Tue, 9 Apr 2013 10:06:51 +0000 (12:06 +0200)]
window: Split out a function

We don't want to remember sizes in the not resizable case. Also a
function named "guess_default_size" should not look at previous sizes,
it should guess.

12 years agowindow: Remove an unused function.
Benjamin Otte [Tue, 9 Apr 2013 09:20:49 +0000 (11:20 +0200)]
window: Remove an unused function.

Luckily, we don't need to support an implementation of a minimal WM for
linux-fb anymore (which is what this function was added for).

12 years agodocs: Fix Since tag for frame clock functions
Benjamin Otte [Mon, 8 Apr 2013 16:05:53 +0000 (18:05 +0200)]
docs: Fix Since tag for frame clock functions

13 years agowayland: Clean up gdkwayland.h
Matthias Clasen [Tue, 9 Apr 2013 02:28:43 +0000 (22:28 -0400)]
wayland: Clean up gdkwayland.h

Make this an include-only header

13 years agowindow: restore size after hide/show properly
Benjamin Otte [Mon, 8 Apr 2013 14:25:29 +0000 (16:25 +0200)]
window: restore size after hide/show properly

Old code assumed the size was stored in widget.allocation. This is no
longer true as the allocation is cleared upon hide. However, we store
the last configure request, and that one tracks the last size, so we can
just use that number.

Sometimes things are so easy - once you figure them out...

https://bugzilla.gnome.org/show_bug.cgi?id=696882

13 years agoplug: Don't unregister windows that were never registered
Benjamin Otte [Mon, 8 Apr 2013 13:28:22 +0000 (15:28 +0200)]
plug: Don't unregister windows that were never registered

Fixes warnings when trying to unregister the socket window. The socket
window is foreign, so we shouldn't register it in the first place.

https://bugzilla.gnome.org/show_bug.cgi?id=697427

13 years agobuild: Fix srcdir != builddir
Colin Walters [Mon, 8 Apr 2013 14:16:58 +0000 (10:16 -0400)]
build: Fix srcdir != builddir

13 years agoExtract strings from .ui files without intltool
Matthias Clasen [Mon, 8 Apr 2013 03:42:55 +0000 (23:42 -0400)]
Extract strings from .ui files without intltool

13 years agoGtkVolumeButton: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 30 Mar 2013 09:51:58 +0000 (18:51 +0900)]
GtkVolumeButton: Define children with a GtkBuilder template

13 years agoGtkFontButton: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 30 Mar 2013 08:35:54 +0000 (17:35 +0900)]
GtkFontButton: Define children with a GtkBuilder template

13 years agoGtkFileChooserButton: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 30 Mar 2013 08:12:35 +0000 (17:12 +0900)]
GtkFileChooserButton: Define children with a GtkBuilder template

13 years agoGtkPathBar: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 30 Mar 2013 07:35:39 +0000 (16:35 +0900)]
GtkPathBar: Define children with a GtkBuilder template

13 years agoGtkColorEditor: Define children with a GtkBuilder template
Tristan Van Berkom [Fri, 29 Mar 2013 12:47:38 +0000 (21:47 +0900)]
GtkColorEditor: Define children with a GtkBuilder template

13 years agoGtkColorPlane: Added construct-only properties to setup the adjustments.
Tristan Van Berkom [Fri, 29 Mar 2013 12:34:50 +0000 (21:34 +0900)]
GtkColorPlane: Added construct-only properties to setup the adjustments.

This allows basic construction of this private type in GtkBuilder script,
so it can be used in the GtkColorEditor UI.

13 years agoGtkPrintUnixDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Thu, 28 Mar 2013 06:06:05 +0000 (15:06 +0900)]
GtkPrintUnixDialog: Define children with a GtkBuilder template

13 years agoGtkPageSetupUnixDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Tue, 26 Mar 2013 15:02:25 +0000 (00:02 +0900)]
GtkPageSetupUnixDialog: Define children with a GtkBuilder template

13 years agoGtkRecentChooserDefault: Define children with a GtkBuilder template
Tristan Van Berkom [Tue, 26 Mar 2013 12:50:28 +0000 (21:50 +0900)]
GtkRecentChooserDefault: Define children with a GtkBuilder template

13 years agoGtkFontChooserDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Tue, 26 Mar 2013 10:13:12 +0000 (19:13 +0900)]
GtkFontChooserDialog: Define children with a GtkBuilder template

13 years agoGtkFontChooserWidget: Define children with a GtkBuilder template
Tristan Van Berkom [Tue, 26 Mar 2013 09:50:01 +0000 (18:50 +0900)]
GtkFontChooserWidget: Define children with a GtkBuilder template

13 years agoGtkFileChooserDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Mon, 25 Mar 2013 12:49:49 +0000 (21:49 +0900)]
GtkFileChooserDialog: Define children with a GtkBuilder template

13 years agoGtkFileChooserDefault: Define children with a GtkBuilder template
Tristan Van Berkom [Sun, 24 Mar 2013 16:40:08 +0000 (01:40 +0900)]
GtkFileChooserDefault: Define children with a GtkBuilder template

13 years agoGtkColorChooserDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 23 Mar 2013 15:41:07 +0000 (00:41 +0900)]
GtkColorChooserDialog: Define children with a GtkBuilder template

13 years agoGtkAppChooserDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 23 Mar 2013 14:02:33 +0000 (23:02 +0900)]
GtkAppChooserDialog: Define children with a GtkBuilder template

13 years agoGtkAppChooserWidget: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 23 Mar 2013 12:59:30 +0000 (21:59 +0900)]
GtkAppChooserWidget: Define children with a GtkBuilder template

13 years agoGtkStatusbar: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 23 Mar 2013 11:38:43 +0000 (20:38 +0900)]
GtkStatusbar: Define children with a GtkBuilder template

13 years agoGtkScaleButton: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 23 Mar 2013 11:17:15 +0000 (20:17 +0900)]
GtkScaleButton: Define children with a GtkBuilder template

13 years agoGtkAssistant: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 23 Mar 2013 10:10:34 +0000 (19:10 +0900)]
GtkAssistant: Define children with a GtkBuilder template

13 years agoGtkLockButton: Define children with a GtkBuilder template
Tristan Van Berkom [Sat, 23 Mar 2013 08:52:48 +0000 (17:52 +0900)]
GtkLockButton: Define children with a GtkBuilder template

13 years agoGtkAboutDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Fri, 22 Mar 2013 12:51:40 +0000 (21:51 +0900)]
GtkAboutDialog: Define children with a GtkBuilder template

13 years agoGtkInfoBar: Define children with a GtkBuilder template
Tristan Van Berkom [Fri, 22 Mar 2013 10:45:31 +0000 (19:45 +0900)]
GtkInfoBar: Define children with a GtkBuilder template

13 years agoGtkMessageDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Fri, 22 Mar 2013 09:45:24 +0000 (18:45 +0900)]
GtkMessageDialog: Define children with a GtkBuilder template

13 years agoGtkDialog: Define children with a GtkBuilder template
Tristan Van Berkom [Thu, 21 Mar 2013 08:54:16 +0000 (17:54 +0900)]
GtkDialog: Define children with a GtkBuilder template

As the first composite widget in GTK+, this patch also
adds some Makefile mechanics to list the ui files as
dependencies of the global GTK+ resources, and adds the
initial test case where composite classes should be tested.

13 years agoAdded directory with Glade catalog
Tristan Van Berkom [Sun, 24 Mar 2013 16:40:57 +0000 (01:40 +0900)]
Added directory with Glade catalog

This catalog can be used to work with GTK+'s private widget types,
this patch exposes a private function gtk_glade_catalog_init() which
Glade will use for the sole purpose of initializing some private widget
types in GTK+ that are referenced from various GTK+ composite widget
xml files.

13 years agoAdd Composite Child machinery and APIs to GtkWidget
Tristan Van Berkom [Wed, 20 Mar 2013 02:56:39 +0000 (11:56 +0900)]
Add Composite Child machinery and APIs to GtkWidget

This commit implements the needed machinery for GtkWidget
to build it's composite content from GtkBuilder XML and
adds the following API:

  o gtk_widget_init_template()

    An api to be called in instance initializers of any
    GtkWidget subclass that uses template XML to build it's components.

  o gtk_widget_class_set_template()

    API to associate GtkBuilder XML to a given GtkWidget subclass

  o gtk_widget_class_automate_child()

    API to declare an object built by GtkBuilder to be associated
    with an instance structure offset and automatically set.

 o gtk_widget_get_automated_child()

   API for bindings to fetch a child declared to be automated by
   gtk_widget_class_automate_child(), for the case where bindings
   do not generate GObjects under the hood and cannot use structure
   offsets to resolve composite object pointers.

 o gtk_widget_class_declare_callback[s]()

   Declare static functions to be used in signal callbacks from
   a given class's template XML

 o gtk_widget_class_set_connect_func()

   API for bindings to override the signal connection machinery
   for a given GtkWidget derived class.

13 years agoGtkBuilder: Allow G_PARAM_CONSTRUCT properties to be set on internal children.
Tristan Van Berkom [Sat, 30 Mar 2013 09:46:16 +0000 (18:46 +0900)]
GtkBuilder: Allow G_PARAM_CONSTRUCT properties to be set on internal children.

This patch allows properties of type G_PARAM_CONSTRUCT to be set
on internal children or explicitly constructed objects (built
with <constructor>) while previously, G_PARAM_CONSTRUCT properties
being set on already constructed objects would result in an misinformed
warning that "construct-only properties cannot be set".

G_PARAM_CONSTRUCT_ONLY properties are still refused as parameters
to already constructed children.

13 years agoGtkBuilder: Add private _gtk_builder_extend_with_template()
Tristan Van Berkom [Wed, 20 Mar 2013 07:33:52 +0000 (16:33 +0900)]
GtkBuilder: Add private _gtk_builder_extend_with_template()

This adds the definition of the <template> tag with some documentation
on the variant of the format.

_gtk_builder_extend_with_template() is to be used while GtkContainer
builds from composite templates. A couple of error codes are also added
to handle a few new possible failure cases.

DTD Files gtkbuilder.rnc and gtkbuilder.rng have been updated to include
the new <template> tag and it's attributes.

13 years agoGtkBuilder: Added api to allow private signal callbacks
Tristan Van Berkom [Wed, 20 Mar 2013 03:48:38 +0000 (12:48 +0900)]
GtkBuilder: Added api to allow private signal callbacks

In preperation for composite objects, for better encapsulation
the following APIs are added to allow handling of signals declared
in the XML with callbacks declared statically.

  o gtk_builder_add_callback_symbol[s]()

    Adds a symbol to the internal symbol hash

  o gtk_builder_lookup_symbol()

    Looks up a symbol, exposed in case added symbols are used
    in conjunction with gtk_builder_connect_signals_full()

The default implementation of gtk_builder_connect_signals() now
does not have a strong requirement on GModule (or a strong requirement
on symbols being declared in the global namespace). Instead GModule
is used as a fallback in the case that symbols are not declared
explicitly.

13 years agoWork around access to global resources without calling gtk_init()
Tristan Van Berkom [Sun, 24 Mar 2013 08:16:20 +0000 (17:16 +0900)]
Work around access to global resources without calling gtk_init()

Some utilities such as GIR and gtk-doc, initialize class vtables without
initializing GTK+, with composite templates accessing resources this
causes a hand full of unneeded warnings.

The workaround for now is the use a private function _gtk_ensure_resources()
which is both called while initializing GTK+, and at the beginning of
gtk_widget_class_set_template_from_resource() (the private function
ensures that the resource will only ever be registered GOnce).

13 years agoDeprecate gtk_widget_push_composite_child & friends
Tristan Van Berkom [Fri, 29 Mar 2013 07:52:28 +0000 (16:52 +0900)]
Deprecate gtk_widget_push_composite_child & friends

Deprecate gtk_widget_push_composite_child, gtk_widget_pop_composite_child,
gtk_widget_set_composite_name, gtk_widget_get_composite_name.

This API is just bloat and was never useful, this patch deprecates
it and removes all internal calls to the composite child APIs

13 years agoGtkScale: Properly chain up in GtkBuildableIface->custom_finished()
Tristan Van Berkom [Mon, 8 Apr 2013 12:04:50 +0000 (21:04 +0900)]
GtkScale: Properly chain up in GtkBuildableIface->custom_finished()

This was causing <style> markup to be ignored when specified
on GtkScale types.

13 years agowayland: Implement gdk_keymap_get_modifier_state
Matthias Clasen [Sun, 7 Apr 2013 01:16:38 +0000 (21:16 -0400)]
wayland: Implement gdk_keymap_get_modifier_state

13 years agocsd: Implement hide-titlebar-when-maximized
Matthias Clasen [Sat, 6 Apr 2013 21:24:29 +0000 (17:24 -0400)]
csd: Implement hide-titlebar-when-maximized

13 years agowayland: Fix gdk_keymap_translate_keyboard_state
Matthias Clasen [Sat, 6 Apr 2013 21:03:27 +0000 (17:03 -0400)]
wayland: Fix gdk_keymap_translate_keyboard_state

I was confusing indices and masks here, which made the modifier
translation go wrong. With this commit, accelerators work.

13 years agoUpdated British English translation
Bruce Cowan [Sat, 6 Apr 2013 16:12:21 +0000 (17:12 +0100)]
Updated British English translation

13 years agowayland: Implement gdk_keymap_translate_keyboard_state
Matthias Clasen [Sat, 6 Apr 2013 14:43:38 +0000 (10:43 -0400)]
wayland: Implement gdk_keymap_translate_keyboard_state

13 years agowayland: Fix up key event translation
Matthias Clasen [Sat, 6 Apr 2013 14:40:56 +0000 (10:40 -0400)]
wayland: Fix up key event translation

The is_modifier field is supposed to be set if the key
would act as a modifier, not if any modifiers are currently
active. To fix this, introduce a private
_gdk_wayland_keymap_key_is_modifier function.

At the same time, make the hardware_keycode field in key
events actually contain the hardware keycode, not a copy
of the keyval.

13 years agotrivial whitespace fix
Matthias Clasen [Sat, 6 Apr 2013 14:38:26 +0000 (10:38 -0400)]
trivial whitespace fix

13 years agowayland: Return NULL as the keyval name for 0
Matthias Clasen [Sat, 6 Apr 2013 14:35:26 +0000 (10:35 -0400)]
wayland: Return NULL as the keyval name for 0

This is what the X11 backend does, and it makes the "NoSymbol"
disappear from menuitems that don't have an accelerator.